//
//  UIBarButtonItem+JLBarButtonItem.m
//  Liang美团HD
//
//  Created by sun on 16/1/19.
//  Copyright © 2016年 sun. All rights reserved.
//

#import "UIBarButtonItem+JLBarButtonItem.h"

@implementation UIBarButtonItem (JLBarButtonItem)
+(UIBarButtonItem *)itemWithnorImage:(NSString *)norImage highImage:(NSString *)highImage target:(id)target action:(SEL)action{
    
    UIButton * button = [[UIButton alloc]init];
    [button setImage:[UIImage imageNamed:norImage] forState:UIControlStateNormal];
    [button setImage:[UIImage imageNamed:highImage] forState:UIControlStateHighlighted];
    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    [button sizeToFit];
    return [[UIBarButtonItem alloc]initWithCustomView:button];
}
@end
